// 封装与房间设置相关的接口
import request from '@/utils/request';

// 获取房间--请求参数类型
type getRoomType = {
  page?: number;
  pageSize?: number;
  b_id?: number;
  floor?: number;
  status?: string;
  room_type_id?: number;
};
// 获取房间列表
export const getRoomList = (params: getRoomType) =>
  request({ url: '/admin/rooms/list', params });
// 修改/新增房间
export const postRoomsEdit = (data: any) =>
  request({ url: '/admin/rooms/edit', method: 'post', data });
export const deleteRoomsDelete = (id: string) =>
  request({ url: '/admin/rooms/delete', method: 'delete', data: { ids: id } });
// 批量入库
export const postRoomsBatchAdd = (list: any) =>
  request({ url: '/admin/rooms/batchAdd', method: 'post', data: { list } });
// 修改房名
export const putRoomsEditRoomName = (data: {
  id: number;
  roomName: string;
  room_type_id: number | string | undefined;
}) => request({ url: '/admin/rooms/editRoomName', method: 'put', data });
